function isLetter(source) {
    for (i = 0; i < source.length; i++) {
        char = source.charCodeAt(i);
        if (!((char >= 65 && char <= 90) ||
            (char >= 97 && char <= 122) ||
            (char >= 48 && char <= 57))) {
            return false;
        }
    }

    return true;
}

function isNormalCharacter(source) {
    for (i = 0; i < source.length; i++) {
        char = source.charCodeAt(i);
        if (!(char >= 32 && char <= 126)) {
            return false;
        }
    }

    return true;
}

function encryptPassword(password) {
    sha256 = CryptoJS.SHA256;
    return sha256(sha256(password).toString() + password).toString();
}

function storeToken(token) {
    localStorage.setItem("access_token", token);
}